BeforeUrlRequestCallback

The callback is invoked when an HTTP request is about to occur.

The callback can be used to redirect the request to another location.

Use the redirect method to redirect the request to another location.

Use the proceed method if you do not need to redirect the location.

If the callback throws an exception, the proceed method will be invoked.

Types

Link copied to clipboard
interface Params
The parameters of the BeforeUrlRequestCallback.
Link copied to clipboard
interface Response
A response for BeforeUrlRequestCallback.

Functions

Link copied to clipboard
abstract fun on(params: P): R
Invoked when the callback needs a response of type R that may be determined based on the provided callback parameters.